home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / Values.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-01  |  1.3 KB  |  53 lines  |  [TEXT/MPS ]

  1. /*
  2.     Values.h -- Numeric Values
  3.  
  4.     Copyright Apple Computer,Inc. 1985,1986
  5.     All rights reserved.
  6. */
  7.  
  8. #ifndef __VALUES__
  9. #define __VALUES__
  10.  
  11. #ifndef __SANE__
  12. #include <SANE.h>
  13. #endif
  14.  
  15. #define BITSPERBYTE 8
  16. #define BITS(type) (BITSPERBYTE * (int)sizeof(type))
  17. #define HIBITS ((short)(1<<BITS(short)-1))
  18. #define HIBITI (1<<BITS(int)-1)
  19. #define HIBITL (1L<<BITS(long)-1)
  20. #define MAXSHORT ((short)~HIBITS)
  21. #define MAXINT (~HIBITI)
  22. #define MAXLONG (~HIBITL)
  23. #define MAXEXTENDED nextextended(inf(),0.0)
  24. #define MAXDOUBLE nextdouble(inf(),0.0)
  25. #define MAXFLOAT nextfloat(inf(),0.0)
  26. #define MINEXTENDED scalb(XMINEXP-1,1.0)
  27. #define MINDOUBLE scalb(DMINEXP-1,1.0)
  28. #define MINFLOAT scalb(FMINEXP-1,1.0)
  29. #define _IEEE 1
  30. #define _XEXPLEN 15
  31. #define _DEXPLEN 11
  32. #define _FEXPLEN 8
  33. #define _HIDDENBIT 1
  34. #define _XHIDDENBIT 0
  35. #define XMINEXP (-16382)
  36. #define DMINEXP (-1021)
  37. #define FMINEXP (-125)
  38. #define XMAXEXP 16384
  39. #define DMAXEXP 1024
  40. #define FMAXEXP 128
  41. #define _LENBASE 1
  42. #define _EXPBASE (1<<_LENBASE)
  43. #define XSIGNIF 64
  44. #define DSIGNIF 53
  45. #define FSIGNIF 24
  46. #define XMAXPOWTWO scalb(XSIGNIF-1,1.0)
  47. #define DMAXPOWTWO scalb(DSIGNIF-1,1.0)
  48. #define FMAXPOWTWO scalb(FSIGNIF-1,1.0)
  49. #define LN_MAXDOUBLE log(MAXDOUBLE)
  50. #define LN_MINDOUBLE log(MINDOUBLE)
  51. #define MAXCOMP (scalb(63,1.0)-1.0)
  52. #endif
  53.